<#assign menuId=3>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>选择样衣-${Application.systemName!}</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="../css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="../css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="../css/AdminLTE.css" rel="stylesheet" type="text/css" />

        <link href="../css/myself.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="../js/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="../js/bootstrap.js" type="text/javascript"></script>
    </head>
    <body class="skin-blue">
        <!-- header logo: style can be found in header.less -->
        <#include "../header.html"/>
        <div class="wrapper row-offcanvas row-offcanvas-left">
       		<#include "../menu.html"/>
            <!-- Right side column. Contains the navbar and content of the page -->
           <aside class="right-side">
           	<section class="content-header" style="position: relative;">
                    <h1>样衣库</h1>
               		<div class="pull-right" style="position: absolute; top: 10px; right: 20px;"> 
                    	<button type="button" class="btn btn-primary" id="add_sample">新增样衣</button>
                   	</div>
                   	<hr style="margin: 10px 0 0 0" />
            </section>
            <section class="content">
            	<div class="row">
            		<div class="col-md-12">
            			<div class="box">
            				<div class="box-header center find-box">
            				<div class="search1" style="margin-top: 20px">
					            	<form action="list" method="post"> 
							       		<ul style="padding: 0;margin-bottom: 0"> 
							       			<li>
												<select class="input-md" name="season" >
	                                                <option value="">季节款式</option>
	                                                <#if (query.season!)=="春款">
	                                                <option value="春款" selected>春款</option>
	                                                <#else>
	                                                <option value="春款">春款</option>
	                                                </#if>
	                                                <#if (query.season!)=="夏款">
	                                                <option value="夏款" selected>夏款</option>
	                                                <#else>
	                                                <option value="夏款">夏款</option>
	                                                </#if>
	                                                <#if (query.season!)=="秋款">
	                                                <option value="秋款" selected>秋款</option>
	                                                <#else>
	                                                <option value="秋款">秋款</option>
	                                                </#if>
	                                                <#if (query.season!)=="冬款">
	                                                <option value="冬款" selected>冬款</option>
	                                                <#else>
	                                                <option value="冬款">冬款</option>
	                                                </#if>
	                                        	</select>
							       			</li>
							       			<li>
												<select class="input-md" name="sex">
	                                                <option value="">性别</option>
	                                                <#if (query.sex!)=="男">
	                                                <option value="男" selected>男</option>
	                                                <#else>
	                                                <option value="男">男</option>
	                                                </#if>
	                                                <#if (query.sex!)=="女">
	                                                <option value="女" selected>女</option>
	                                                <#else>
	                                                <option value="女">女</option>
	                                                </#if>
	                                                <#if (query.sex!)=="中性">
	                                                <option value="中性" selected>中性</option>
	                                                <#else>
	                                                <option value="中性">中性</option>
	                                                </#if>
	                                        	</select>
												
							       			</li>
							       			<li>
												<select class="input-md" name="category" id="category">
	                                                <option value="">分类</option>
	                                        	</select>
							       			</li>
							       		 	<li>
							       		 		<input type="text" name="code" value="${query.code!}" placeholder="输入款号"/>
							       		 	</li>
							       		 	<#if customerId??>
	                                       	<input type="text" name="customerId" hidden value="${customerId!}"/>
	                                       	</#if>
	                                       	<#if customerName??>
	                                       	<input type="text" name="customerName" hidden value="${customerName!}"/>
	                                       	</#if>
	                                       	<input type="text" name="ids" hidden value="${ids!}"/>
							       			<li>
							       				<div>
				                                    <button type="submit" class="btn btn-primary btn-sm">搜索</button>
		                                		</div>
							       			</li>
							       			
							       		</ul>
							       		</form>
							       	</div> 
            				
            				
                               <!--  <form action="list">
                            	<div class="pull-left find-row" style="padding-left: 29px;">
                            		<div class="pull-left find-col">
                            			
                            			<label class="pull-left">
                            				<select class="input-md" name="season" >
                                                <option value="">季节款式</option>
                                                <#if (query.season!)=="春款">
                                                <option value="春款" selected>春款</option>
                                                <#else>
                                                <option value="春款">春款</option>
                                                </#if>
                                                <#if (query.season!)=="夏款">
                                                <option value="夏款" selected>夏款</option>
                                                <#else>
                                                <option value="夏款">夏款</option>
                                                </#if>
                                                <#if (query.season!)=="秋款">
                                                <option value="秋款" selected>秋款</option>
                                                <#else>
                                                <option value="秋款">秋款</option>
                                                </#if>
                                                <#if (query.season!)=="冬款">
                                                <option value="冬款" selected>冬款</option>
                                                <#else>
                                                <option value="冬款">冬款</option>
                                                </#if>
                                        	</select>
                            			</label>
                            			<label class="pull-left">
                            				<select class="input-md" name="sex">
                                                <option value="">性别</option>
                                                <#if (query.sex!)=="男">
                                                <option value="男" selected>男</option>
                                                <#else>
                                                <option value="男">男</option>
                                                </#if>
                                                <#if (query.sex!)=="女">
                                                <option value="女" selected>女</option>
                                                <#else>
                                                <option value="女">女</option>
                                                </#if>
                                                <#if (query.sex!)=="中性">
                                                <option value="中性" selected>中性</option>
                                                <#else>
                                                <option value="中性">中性</option>
                                                </#if>
                                        	</select>
                            			</label>
                            			<label class="pull-left">
                            				<select class="input-md" name="category" id="category">
                                                <option value="">分类</option>
                                        	</select>
                            			</label>
                                        <label class="pull-left">
                                            <input type="text" name="code" value="${query.code!}" placeholder="输入款号"/>
                                        </label>
                                       	<#if customerId??>
                                       	<input type="text" name="customerId" hidden value="${customerId!}"/>
                                       	</#if>
                                       	<#if customerName??>
                                       	<input type="text" name="customerName" hidden value="${customerName!}"/>
                                       	</#if>
                                       	<input type="text" name="ids" hidden value="${ids!}"/>
                            			<div class="pull-left" style="margin-left: 5px;">
		                                    <button type="submit" class="btn btn-primary btn-sm">搜索</button>
                                		</div>
                            		</div>
                            	</div>
                            	</form> -->
                            </div><!-- /.box-header -->
            				
            				
				            <div class="clearfix search-div center" style="margin-top: 0">
						       	<div class="clearfix content" style="padding: 0;">
						       		<#if sampleStoreList?size!=0>
						       		<#list sampleStoreList as sampleStore>
                                    <div class="content_find">
                                    	<span hidden>${sampleStore.id!}</span>
                                    	<input id="check_choose" type="checkbox" name="choth">
                                        <div onclick="showDetail('${sampleStore.id!}');">
                                            <img src="${Application.accessFileUrl!}${sampleStore.mainImage!}">
                                        </div>
                                        <p onclick="showDetail('${sampleStore.id!}');">${sampleStore.code!}<br/>
                                        	<#if sampleStore.style?size!=0>
                                        	<#list sampleStore.style as style>
                                        		${style!} 
                                        	</#list>
                                        	</#if>
                                        </p>
                                        
                                    </div>
                                    </#list>
                                    </#if>
                                </div>
                                
						       <div class="tc"></div>
					        <div class="tc2">
				        		<button type="button" class="close" id="close"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                <div class="tc2_left">
                                     <p>上</p>
                                     <p>一</p>
                                     <p>张</p>
                                 </div>
                                 <div class="tc2_content1">
                                     <div class="tc2_content1_d1">   样衣编号 
                                       	<span id="code">VNB201611100001</span>
                                     </div>
                                      <div class="tc2_content1_d2">
                                       	<   1  /   5   >
                                      </div>
                                  </div>

                                  <div class="tc2_content2">
                                      <div class="tc2_content2_d1">
                                          <p>
                                              <span>季节款式</span>
                                              <span>春款、夏款、秋款</span>
                                          </p>
                                          <p>
                                              <span>性别</span>
                                              <span>中性</span>
                                          </p>
                                          <p>
                                              <span>分类</span>
                                              <span>外套、大衣</span>
                                          </p>
                                          <p>
                                              <span>风格</span>
                                              <span>气质、有型、女人味</span>
                                          </p>
                                      </div>
                                      <div class="tc2_content2_d2">
                                          <span>样衣来源</span>
                                          <span>绍兴伍德纺织厂</span>
                                      </div>
                                      <div class="tc2_content2_d2">
                                          <span>备注</span>
                                          <span></span>
                                      </div>
                                      <!-- 
                                      <div class="btn btn-primary tc2_btn">
                                          创建打样订单
                                      </div> -->
                                  </div>


                                  <div class="tc2_right">
                                      <p>下</p>
                                      <p>一</p>
                                      <p>张</p>
                                  </div>
                              </div>
                                 <div class="shopping clearfix" style="margin: 20px 0; padding-right: 28px">
                                   <!-- <div class="shopCar">
                                        <div class="dropdown fl">
                                            <img id="dLabel" src="../images/ic_cloth.png" data-target="#" href="http://example.com" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                               <li><a href="#">adfasdf</a></li>

                                            </ul>
                                        </div>
                                    </div>-->
                                    <div class="btn-group dropup" style="cursor: pointer;">
                                    <div class="glyphicon glyphicon-shopping-cart"> </div>
                                    <ul class="dropdown-menu2" id="shop_menu">
                                        <!-- <li class="clearfix">
                                            <div class="fl">
                                                <img src="../img/user2.jpg">
                                            </div>
                                            <div class="fl">
                                                <p>aaaaaaaaaaaaa</p>
                                                <p>气质 有型 女人味</p>
                                            </div>
                                            <div class="fr">
                                                <div class="red_circle">
                                                    <span></span>
                                                </div>
                                            </div>
                                        </li> -->
                                    </ul>
                                </div>
                                <button class="btn btn-primary pull-right" id="create_order">确定选择&nbsp; 下一步</button>
                            </div>
                            </div>
                            
                               
                            
                            <div class="clearfix">
                                <div class="pages fr">
                                    <ul class="pagination pagination-sm no-margin pull-right">
		                                ${splitPage?replace("{url}","${path}")}
		                            </ul>
                                </div>
                            </div>
            			</div>
            		</div>
            	</div>
            </section>
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->
        <style type="text/css">
        	/* 搜索条件样式 */
        	.find-row label {
			    padding: 0 1px;
			}
        	/*  */
        	
        	
        	
        	
        	
        	
        	
        	/*  */
            .content_find{
                width: 19%;
                height: 311px;
                border:1px solid #ccc;
                float: left;
                margin-right: 8px;
                margin-bottom: 8px;
                overflow: hidden;
                position: relative;
            }
            .content_find:hover{
                background-color: #212121;
                color: #fff;
                cursor: pointer;
            }
            .content_find>div{
                width: 100%;
                height: 78%;
                position: absolute;
                background-color: #fff;
            }
            .content_find>div>img{
                width: 90%;
                height: 90%;
                margin: 5% ;
            }
            .content_find>p{
                width: 100%;
                height: 20%;
                text-align: center;
                line-height: 200%;
                bottom: -5%;
                position: absolute;
            }
            .close{
                color: white;
                font-size: 45px;
                padding: 20px;
                z-index: 1400;
            }
            .tc{
                position: fixed;
                width: 100%;
                height: 100%;
                background-color: #000;
                opacity: .7;
                top: 0;
                left: 0;
                z-index: 1100;
                display: none;
            }
            .tc2{
                position: fixed;
                width: 100%;
                height: 100%;
                top: 0;
                left: 0;
                z-index: 1400;
                display: none;;
            }
            .tc2_left{
                width: 5%;
                max-width: 60px;
                height: 140px;
                border:1px solid #000;
                border-radius: 10px;
                background-color: #fff;
                position: absolute;
                top: 200px;
                text-align: center;
                line-height: 20px;
                cursor: pointer;
                left: 5%;
            }
            .tc2_left>p{
                width:1em;
                margin: 20px auto;
            }
            .tc2_right{
                width: 5%;
                max-width: 60px;
                height: 140px;
                border:1px solid #000;
                border-radius: 10px;
                background-color: #fff;
                position: absolute;
                top: 200px;
                text-align: center;
                line-height: 20px;
                cursor: pointer;
                right: 5%;
            }
            .tc2_right>p{
                width:1em;
                margin: 20px auto;
            }
            .tc2_content1{
                width: 45%;
                height:500px;
                background-color: #fff;
                top: 100px;
                left: 15%;
                position: absolute; 
            }
            .tc2_content2{
                width: 25%;
                height:350px;
                background-color: #fff;
                top: 100px;
                left: 61%;
                position: absolute;
                border-radius: 10px; 
            }
            .tc2_content1_d1{
                width: 100%;
                height: 50px;
                line-height: 50px;
                background-color: #373f4d;
                color: #fff;
                padding-left: 120px;
            }
            .tc2_content1_d1>i{
                float: right;margin-right: 30px;
                line-height: 50px;
                cursor: pointer;
            }
            .tc2_content1>img{
                width: 100%;
                height: 450px;
                background-color: #fff;
                position: absolute;
            }
            .tc2_content1_d2{
                width: 90px;
                height: 30px;
                background-color: #5f6571;
                color: #fff;
                text-align: center;
                line-height: 30px;
                border-radius: 15px 0 0 15px;
                position: absolute;
                right: 0;
                top: 70px;
                font-weight: bold;
                z-index:999;
            }
            
            .tc2_content2_d1{
                width: 90%;
                height: 180px;
                margin: 20px auto;
                border-bottom: 1px dashed #ccc;
            }
            .tc2_content2_d1>p{
                width: 100%;
                height: 33px;
                line-height: 33px;
                margin-top: 5px;
            }
            .tc2_content2_d1>p>span{
                float: left;
                width: 60%;
            }

            .tc2_content2_d1>p>span:first-child{
                width: 30%;
                height: 33px;
                line-height: 33px;
                border:1px solid #000;
                text-align: center;
                max-width: 70px;
                margin-right: 10%;
            }
            .tc2_content2_d2{
                width: 90%;
                height: 30px;
                margin: 0px auto;
                line-height: 30px;
            }
             .tc2_content2_d2>span{
                float: left;
                width: 60%;
            }

            .tc2_content2_d2>span:first-child{
                width: 30%;
                text-align: center;
                max-width: 70px;
                margin-right: 10%;
            }
            .tc2_btn{
                margin: 20px 5%;
                width: 90%;
            }

            .shopping .dropdown-menu2{
                position: absolute;
                bottom: 130%;
                left: 0;
                display: none;
                z-index: 1000;
                float: left;
                min-width: 160px;
                padding: 5px 0;
                margin: 2px 0 0;
                font-size: 14px;
                list-style: none;
                background-color: #ffffff;
                border: 1px solid #cccccc;
                border: 1px solid rgba(0, 0, 0, 0.15);
                border-radius: 4px;
                -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
                box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
                background-clip: padding-box;
            }
            .shopping .dropdown-menu2 li img{width: 40px;height: 40px;display: block;}
            .shopping .dropdown-menu2 li{width: 200px;border-bottom: 1px #ccc solid;}
            .shopping .dropdown-menu2 li>div:first-child{width: 40px;}
            .shopping .dropdown-menu2 li>div:nth-child(2){padding:0 10px;}
            .shopping .dropdown-menu2 li>div:last-child{width: 30px;}
            .shopping .dropdown-menu2 li>div:last-child{ border-bottom: none;}
            .shopping .dropdown-menu2 li>div:last-child .red_circle{margin-top: 10px;}
            .shopping .dropdown-menu2 li>div:last-child .red_circle span{width: 11px;height: 3px;margin: auto;background: white;display: block;margin-top: 8px;}
            .content_find{position: relative;}
            .content_find input{position: absolute;right:0;top:0;width:25px;height:25px;z-index: 99;}
            .glyphicon-shopping-cart{width: 30px;height:30px;font-size: 30px;color: red;}
        </style>
        <script src="../js/order/proofingOrder_choose.js"></script>
        <script src="../js/common/common.js" type="text/javascript"></script>
    </body>
    <script type="text/javascript">
        $(function(){
			setCategory();
			model.url='${Application.accessFileUrl!}';
		})
		<#if query.category??>
		function getCategory(){
			var opts=$('#category').children();
			for(var i=0;i<opts.length;i++){
				if(opts.eq(i).val()=="${query.category}"){
					opts.eq(i).attr('selected','selected');
					return;
				}
			}
		}
		$(function(){
			getCategory();
		})
		</#if>
		$(function(){
			$('.close').click(hideDetail);
		})
		$(function(){
			var ids=$('input[name="ids"]').val();
			if(ids){
				model.ids=ids.split(',');
				for(var i=0;i<model.ids.length;i++){
					getSample(model.ids[i]);
				}
			}
			shopcat();
		})
		function shopcat(){
			//$('.glyphicon').show();
			$(".glyphicon-shopping-cart").click(function(){
				if($('#shop_menu').css('display')=='none'){
                    $(".dropdown-menu2").fadeIn("show","linear");
                    return false;
                }else{
                    $(".dropdown-menu2").fadeOut("show","linear");
                    return false;
                }
			});
		}
		<#if sampleStoreList?size!=0>
		$(function(){
			model.id=[];
			<#list sampleStoreList as sample>
			model.id[${sample_index}]=${sample.id};
			</#list>
			for(var i=0;i<model.id.length;i++){
				for(var j=0;j<model.ids.length;j++){
					if(model.id[i]==model.ids[j]){
						$(':checkbox').eq(i).prop('checked',true);
						break;
					}
				}
			}
		})
		</#if>
		$(function(){
			<#if customerId??>
			model.customerId='${customerId!}';
			</#if>
			<#if customerName??>
			model.customerName='${customerName}';
			</#if>
			if(model.customerId){
				var webs=$('.pagination li a');
				for(var i=0;i<webs.length;i++){
					var href=webs.eq(i).attr('href');
					var index=href.indexOf('customerId');
					if(index==-1){
						var param='';
						param+='customerId='+model.customerId;
						param+='&customerName='+model.customerName;
						if(model.ids){
							param+='&ids='+model.ids;
						}
						href=href.replace('?','?'+param);
						webs.eq(i).attr('href',href);
					}
				}
			}
		})
        </script>
</html>

